<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('user/index',array('type' => $type))}">{:lang('ADMIN_USER_INDEX')}</a></li>
			<li class="active"><a href="{:url('user/add',array('type' => $type))}">{:lang('ADMIN_USER_ADD')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('user/addPost')}">
			<div class="form-group">
				<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('USERNAME')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_login" name="user_login">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_pass" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('PASSWORD')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_pass" name="user_pass" placeholder="******">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_email" class="col-sm-2 control-label">{:lang('EMAIL')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_email" name="user_email">
				</div>
			</div>
			<div class="form-group">
				<label for="input-remark" class="col-sm-2 control-label">{:lang('REMARK')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-remark" name="remark" placeholder="管理员职责，姓名...">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>是否高级管理员</label>
				<div class="col-md-6 col-sm-10">
					<label class="radio-inline">
						<input value="1" type="radio" name="user_type" checked="true"> 普通管理员
					</label>
					<label class="radio-inline">
						<input value="2" type="radio" name="user_type"> 高级管理员，某些功能权限高于普通管理员
					</label>
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
				<div class="col-md-6 col-sm-10">
					<foreach name="roles" item="vo">
						<label class="radio-inline">
							<input value="{$vo.id}" type="radio" name="role_id" <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo.name}
						</label>
					</foreach>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">所属平台</label>
				<div class="col-md-6 col-sm-10">
					<if condition="APP_NAME == 'center'">
						{:widget('center/Platform/checkbox',[''])}
					<else/>
						<foreach name="serverInfo" item="vo" key="k">
							<label class="checkbox-inline">
								<input value="{$k}" type="checkbox" name="platform[]">{$vo}
							</label>
						</foreach>
					</if>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="type" value="{$type}" />
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>